import 'package:flutter_svg/svg.dart';

import 'package:flutter/material.dart';

const kMaxHeigth = 150.0;

class CustomAppbar extends SliverPersistentHeaderDelegate {
  final double minHeight;
  final String title;
  final String bpm;
  CustomAppbar(this.minHeight, this.title, this.bpm);
  @override
  Widget build(
      BuildContext context, double shrinkOffset, bool overlapsContent) {
    return Stack(
      children: [
        Positioned(
            right: 0,
            bottom: 0,
            left: 0,
            height: 200,
            child: SvgPicture.asset('assets/sleep.svg', fit: BoxFit.fitWidth)),
      ],
    );
  }

  @override
  double get maxExtent => kMaxHeigth;

  @override
  double get minExtent => 0;

  @override
  bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate) {
    return false;
  }
}
